package vista;

import java.awt.Graphics;
import javax.swing.ImageIcon;
import javax.swing.JPanel;


public class Foto extends JPanel{
	
	private String imagen;
	private int ancho;
	private int alto;
	
	public Foto(String imagen, int ancho , int alto){
	
		this.imagen = new String(imagen);
		this.ancho = ancho;
		this.alto = alto;
		
	}
	
	public void paintComponent(Graphics g) {
		ImageIcon imagen = new ImageIcon(this.imagen);
		g.drawImage(imagen.getImage(), 0, 0, ancho, alto,null);
		setOpaque(false);
		super.paintComponent(g);
	}
	
}
